package org.saltlux.study.jackrabbit;

import org.junit.Assert;
import org.junit.Test;
import org.hamcrest.CoreMatchers;

public class RepositoryManagerTester {
	@Test
	public void getInstance() {
		RepositoryManager manager1 = RepositoryManager.getInstance();
		RepositoryManager manager2 = RepositoryManager.getInstance();
		
		Assert.assertThat(manager1, CoreMatchers.is(CoreMatchers.notNullValue()));
		Assert.assertSame(manager1, manager2);
	}
	
	@Test
	public void getRepository() {
		RepositoryManager manager = RepositoryManager.getInstance();
		
		Assert.assertSame(manager.getRepository(), manager.getRepository());
	}
}
